﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QD.Utils;

namespace DaZhong.app_code
{
    public class WebSiteUrls
    {
        /// <summary>
        /// 今日头条
        /// </summary>
        public static class TouTiao
        {
            private const string apiUrl = "http://m.toutiao.com/list/?tag={0}&ac=wap&count=20&format=json_raw&as=A10568679DFE939&cp=587DEEC9B3397E1&min_behot_time=0";
            /// <summary>
            /// 首页
            /// </summary>
            public static string IndexUrl = "http://m.toutiao.com/";

            /// <summary>
            /// 热点
            /// </summary>
            public static string HotPoint => string.Format(apiUrl, "news_hot");
            //社会
            public static string Society => string.Format(apiUrl, "news_society");

            public static string Finance => string.Format(apiUrl, "news_finance");

            /// <summary>
            /// 娱乐
            /// </summary>
            public static string Amusements => string.Format(apiUrl, "news_entertainment");
            /// <summary>
            /// 军事
            /// </summary>
            public static string news_military => string.Format(apiUrl, "news_military");
            /// <summary>
            /// 汽车
            /// </summary>
            public static string news_car => string.Format(apiUrl, "news_car");
            /// <summary>
            /// 体育
            /// </summary>
            public static string news_sports => string.Format(apiUrl, "news_sports");
            /// <summary>
            /// 国际
            /// </summary>
            public static string news_world => string.Format(apiUrl, "news_world");

            public static string news_fashion => string.Format(apiUrl, "news_fashion");
        }
        /// <summary>
        /// 腾讯新闻
        /// </summary>
        public static class Tenctent
        {
            /// <summary>
            /// 新闻id集合
            /// </summary>
            public static string NewNews
            {
                get { return string.Format("http://openapi.inews.qq.com/getQQNewsIndexAndItems?chlid=news_news_top&refer=mobilewwwqqcom&otype=jsonp&t={0}", StringUtils.ConvertDateTimeInt(DateTime.Now.AddMinutes(-5))); }
            }
            /// <summary>
            /// 新闻id集合 获取数据接口
            /// </summary>
            /// <param name="idsStr"></param>
            /// <returns></returns>
            public static string NewNewsContents(string idsStr)
            {
                return string.Format("http://openapi.inews.qq.com/getQQNewsNormalContent?ids={0}&refer=mobilewwwqqcom&otype=jsonp&t={1}", idsStr, StringUtils.ConvertDateTimeInt(DateTime.Now.AddMinutes(-5)));
            }
        }

        public static class WeiChat
        {
            /// <summary>
            /// 搜公众号
            /// </summary>
            /// <param name="account"></param>
            /// <returns></returns>
            public static string WeiChatAccout
            {
                get
                {
                    return "http://weixin.sogou.com/weixin?type=1&query={0}";
                }

            }
            /// <summary>
            /// 搜公关键词
            /// </summary>
            /// <param name="account"></param>
            /// <returns></returns>
            public static string WeiChatKeyword
            {
                get
                {
                    return "http://weixin.sogou.com/weixin?query={0}&_sug_type_=&s_from=input&_sug_=y&type=2&page={1}&ie=utf8";
                }

            }
        }
    }


}
